<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
    </head>
    <body>
        <div id="app">
            <h2 :style="{fontSize: h2_fontsize, color: h2_color}">{{message}}</h2>
            <h2 :style="getStyles()">{{message}}</h2>
            <h2 :style="{fontSize: '40px', color: 'black'}">{{message}}</h2>
            <h2 :style="{fontSize: h3_fontsize+'px', color: 'black', backgroundColor: 'blue'}">{{message}}</h2>
        </div>
        <script src="../../js/vue.js"></script>
        <script>
          const app = new Vue({
                el: '#app',
                data: {
                    message: '你好呀',
                    h2_fontsize: '50px',
                    h3_fontsize: 20,
                    h2_color: 'red',
                },
                methods: {
                    getStyles: function () {
                        return {fontSize: this.h2_fontsize, color: this.h2_color}
                    }
                }
            }) 
        </script>
    </body>
</html>